package cn.edu.neusoft.myappos.Activity;

import androidx.appcompat.app.AppCompatActivity;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;

import cn.edu.neusoft.myappos.R;

public class MainActivity extends AppCompatActivity {

    private Button bt_comm,         //评论
            bt_course,              //课程
            bt_break,
            bt_user_zone;           //用户信息

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        init();
    }

    private void init() {
        //评论
        bt_comm = findViewById(R.id.button6);
        //课程
        bt_course = findViewById(R.id.button7);
        //用户信息
        bt_user_zone = findViewById(R.id.button8);

        bt_break = findViewById(R.id.button14);
        //添加点击事件

        bt_comm.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                Intent intent = new Intent(MainActivity.this,MainCommentActivity.class);
                startActivity(intent);
            }
        });

        bt_course.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                Intent intent = new Intent(MainActivity.this, MainCourseActivity.class);
                startActivity(intent);
            }
        });

        bt_user_zone.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                Intent intent = new Intent(MainActivity.this, MainUserZoneActivity.class);
                startActivity(intent);
            }
        });
        bt_break.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                Intent intent = new Intent(cn.edu.neusoft.myappos.Activity.MainActivity.this, FristActivity.class);
                startActivity(intent);
            }
        });
    }


}